home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ Software Uninstall.xpl < prev    next >
Text File  |  1999-07-08  |  3KB  |  95 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="8"
  3. "COUNT"="3"
  4. "TEXT 1"="Edit Name..."
  5. "TEXT 2"="Edit CMD..."
  6. "TEXT 3"="Delete"
  7. "UIPATH"="System\Software Installation\Uninstall"
  8. "NAME"="Uninstall Software List Editor"
  9. "VERSION"="1.4"
  10. "LANGUAGE"="VBScript"
  11. "DESCRIPTION 1"="For every program that has been installed, an item is created here.
  12. "DESCRIPTION 2"="ALWAYS try to use "Start - Settings - Control Panel - Software" to remove an item before using this plug-in."
  13. "DESCRIPTION 3"="This plug-in will NOT uninstall the software, it just removes the selected item from the registry!"
  14. "AUTHOR"="Xteq Systems"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  17.  
  18. sP="HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\"
  19. sV1="\DisplayName"
  20. sV2="\UninstallString"
  21. Sub Plugin_Initialize 
  22.  iCount=RegEnumPaths(sP)
  23.  
  24.  if iCount>0 then
  25.   for l=1 to iCount
  26.    s=sP & RegEnumElement(l) & sV1
  27.    s=RegReadValue(s)
  28.    Call SetUIElement(l,s)
  29.   next
  30.  else
  31.   Disable
  32.  end if
  33. End Sub
  34.  
  35. Sub Plugin_CheckData(ElementIndex)
  36. End Sub
  37.  
  38. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  39.  if ElementSubIndex>0 then 'OK, user has selected an item
  40.  
  41.    If ElementIndex=1 then 'Rename name
  42.  
  43.       s=sp & RegEnumElement(ElementSubIndex) & sV1
  44.       sV=RegReadValue(s) 
  45.   
  46.        sV=InputWindow("Change Name in List",sV,1)
  47.        if IsEmpty(sV)=false then
  48.           'change it!
  49.           Call RegWriteValue(s,sV,1)          
  50.           Call SetUIElement(ElementSubIndex,sV)   
  51.        end if 
  52.  
  53.    else
  54.     if ElementIndex=3 then  'Delete!!
  55.  
  56.        'Create name of first value
  57.        s=sp & RegEnumElement(ElementSubIndex) & sV1
  58.        Call RegDeleteValue(s)
  59.  
  60.        'Create name of Second value
  61.        s=sp & RegEnumElement(ElementSubIndex) & sV2
  62.        Call RegDeleteValue(s)
  63.  
  64.        'Now delete the path
  65.        s=sp & RegEnumElement(ElementSubIndex)
  66.        Call RegDeletePath(s)
  67.  
  68.        'Set item to empty so it is removed from the list...
  69.        Call SetUIElement(ElementSubIndex,"")
  70.  
  71.     else 'Edit command
  72.  
  73.        s=sp & RegEnumElement(ElementSubIndex) & sV2
  74.        sV=RegReadValue(s) 
  75.   
  76.        sV=InputWindow("Change Uninstall Command",sV,1)
  77.        if IsEmpty(sV)=false then
  78.           'change it!
  79.           Call RegWriteValue(s,sV,1)
  80.        end if 
  81.  
  82.     end if
  83.    end if
  84.  
  85.  else
  86.   Call MsgWarning("No item selected - please select an item first.")
  87.  end if
  88. End Sub
  89.  
  90. Sub Plugin_Terminate 
  91. End Sub
  92.  
  93.  
  94.  
  95.